package com.funsport.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 活动报名实体
 *
 * @author Fun-Sport Team
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("event_signups")
public class EventSignup implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long eventId;
    private Long userId;

    /**
     * 报名状态：pending-待确认，confirmed-已确认，cancelled-已取消，attended-已参加，absent-缺席
     */
    private String status;

    /**
     * 是否候补
     */
    private Boolean isWaitlist;

    /**
     * 报名备注
     */
    private String signupNote;

    /**
     * 是否签到
     */
    private Boolean checkedIn;

    /**
     * 签到时间
     */
    private LocalDateTime checkInTime;

    /**
     * 评分：1-5
     */
    private Integer rating;

    /**
     * 评价内容
     */
    private String review;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}

